var mongoose = require('mongoose');
mongoose.Promise = global.Promise;

//connect to mongodb
mongoose.connect(
    'mongodb://localhost:27017/test',
    {useMongoClient:true}
).then(function(db){
    console.log('DB connect success !!')
}).catch(function(err){
    console.log('DB connect failed!!');
    console.log(err.stack);
});

var foodItemSchema = require('../../../app/schema/foodItem.js');
var foodItemModel = mongoose.model('FoodItem',foodItemSchema);